var request = require('../../utils/request.js');

Component({
  properties:{
    tabs:{
      type:Array,
      value:[{}],
      description:'导航'
    },
    types:{
      type:String,
      value:'',
      description:'导航'
    }
  },
  methods:{
    tap:function(e){
      var item = e.currentTarget.id;
      this.triggerEvent('selected',{
        tabSlect:item
      });
    },
    login:function(e){
      if(e.currentTarget.id === '我的'){
        request.wxlogin().then(Response=>{
          console.log("wqeraerq")
          console.log(wx.getStorageSync('userinfo'))
          this.triggerEvent('haslogin',{
            userInFo:wx.getStorageSync('userinfo')
          });
        })

        // request.mpLogin()
        // request.mpLogin().then(Response=>{
        // })
      }
    }
  }
})